<template>
  <div o-Container>
    <o-list v-bind:source="list.running" v-bind="{modified:modify}"/>
    <o-dialog v-bind:source="panel">
      <template slot="content">
        <o-item v-bind:source="item.running" v-bind="{backed:back}"></o-item>
      </template>
    </o-dialog>
  </div>
</template>

<script>
  export default {
    name: "mms_logger_running_list", /* 这个name暂时不知道用啥用，根据官方文档说的是方便排错的 */
    data() {
      return {
        octopus: this.$parent.octopus,
        list: {
          running: {
            data: {
              id: 397, // 菜单表的八爪鱼ID
              cellData: [
                {name: "LevelID", searchKey: "=", width: 40},
                {name: "CreateDate", width: 140},
                {name: "FileName", searchKey: "like", width: 150},
                {name: "CLassName", width: 350},
                {name: "FunctionName", searchKey: "like", width: 150},
                {name: "LineNumber", width: 40},
                {name: "Message", searchKey: "like", width: 700},
              ],
            }
          },
        },
        item: {
          running: {
            // 以下参数默认由组件内部创建，但是如果有需要，开发人员可在这里提前设置，组件将按照您的预期渲染。
            // cache: false,
            // control: null,
            // dataExtend: null,
            data: {
              id: 397,
              value: "",
              cellData: [
                {name: "LevelID"},
                {name: "FileName"},
                {name: "CLassName"},
                {name: "FunctionName"},
                {name: "LineNumber"},
                {name: "CreateDate"},
                {name: "Message"},
              ]
            },
          },
        },
        panel: {
          visible: false,
        },
      }
    },
    methods: {
      modify: function (row) {
        // 加载对应的列关联绑定数据
        this.item.running.data.value = row.ID;
        this.item.running.control.load();
        this.panel.visible = true; //打开
      },
      back: function () {
        this.panel.visible = false; //取消
      }
    },
    props: ["oData"] //数据
  }
</script>
